#pragma once

#include "Event.h"


namespace Rpg {
	class MouseMovedEvent : public Event {
	public:
		MouseMovedEvent(float x , float y):m_Posx(x),m_Posy(y){}

		inline float GetX() { return m_Posx; }
		inline float GetY() { return m_Posy; }
		EVENT_CLASS_TYPE(MouseMoved)
		EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput)
			std::string ToString() const override {
			std::stringstream ss;
			ss << "MouseMovedEvent:" << "(" << m_Posx << "," << m_Posy << ")";
			return ss.str();
		};
	private:
		float m_Posx;
		float m_Posy;
	};

	class MouseScrolledEvent :public Event {
	public:
		MouseScrolledEvent(float offsetX, float offsetY) :m_OffsetX(offsetX), m_OffsetY(offsetY) {}

		inline float GetOffsetX() { return m_OffsetX; }
		inline float GetOffsetY() { return m_OffsetY; }
		EVENT_CLASS_TYPE(MouseScrolled)
		EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput)

		std::string ToString() const override {
			std::stringstream ss;
			ss << "MouseScrolledEvent:" << "(" << m_OffsetX << "," << m_OffsetY << ")";
			return ss.str();
		};
	private:
		float m_OffsetX;
		float m_OffsetY;
	};

	class MouseButtonEvent :public Event {
	public:
		
		inline int GetMouseButton() { return m_button; }
		EVENT_CLASS_CATEGORY(EventCategoryMouse | EventCategoryInput)
		std::string ToString() const override {
			std::stringstream ss;
			ss << "MouseButtonEvent:" << "(" << m_button << ")";
			return ss.str();
		};
	protected:
		MouseButtonEvent(int button) :m_button(button) {};
		int m_button;
		
	};

	class MouseButtonPressedEvent : public MouseButtonEvent {
	public:
		MouseButtonPressedEvent(int button) :MouseButtonEvent(button) {};
		std::string ToString() const override {
			std::stringstream ss;
			ss << "MouseButtonPressedEvent:" << "(" << m_button << ")";
			return ss.str();
		};
		EVENT_CLASS_TYPE(MouseButtonPressed)
	};

	class MouseButtonReleasedEvent : public MouseButtonEvent {
	public:
		MouseButtonReleasedEvent(int button) :MouseButtonEvent(button) {};
		std::string ToString() const override {
			std::stringstream ss;
			ss << "MouseButtonPressedEvent:" << "(" << m_button << ")";
			return ss.str();
		};
		EVENT_CLASS_TYPE(MouseButtonReleased)
	};
}